<script type="text/javascript" src="/public/js/jquery.appear.js"></script>
<script type="text/javascript" src="/public/js/my/feed_autoload.js"></script>
<div class="row" id="feed">
    <div class="span8">
        <div class="title-divider">
            <h3>Останні новини</h3>
            <div class="divider-arrow"></div>
        </div>
    </div>    
    <?php foreach($this->content as $post): ?>    
        <article class="blog-post span8" id="<?php echo $post['id']; ?>">
            <div class="block-dark">
                <div class="block-light">
                    <div class="wrapper-img">                    
                        <a>
                            <center>
                                <!--<img src="" alt="photo"/>-->
                                <?php echo $post['preview_mediadata']; ?>
                            </center>
                        </a>
                    </div>
                    <div class="wrapper">
                        <h2 class="post-title">
                            <a href="<?php echo $this->href; ?>/<?php echo $post['alias']; ?>">
                                <?php echo $post['title']; ?>
                            </a>
                        </h2>
                        <b><?php echo $post['date_create']; ?></b>
                        <!--<a href="#" class="blog-comments">3</a>-->
                        <p>
                            <?php echo $post['preview_text']; ?>
                            <a href="<?php echo $this->href; ?>/<?php echo $post['alias']; ?>" class="read-more">[Подробнее]</a>
                        </p>                    
                        <p class="tags">
                            Теги:
                            <?php foreach ($post['tags'] as $tag): ?>
                                <a href="/posts-by-tag/tag_id/<?php echo $tag['id']; ?>">
                                    <?php echo $tag['tag_name']; ?>
                                </a>
                            <?php endforeach; ?>                        
                        </p>
                    </div>
                </div>
            </div>
        </article>
    <?php endforeach; ?>
</div>